﻿// Decompiled with JetBrains decompiler
// Type: DnProcessSimulateCommands.CApNodesFileWriter
// Assembly: DnProcessSimulateCommands, Version=2402.0.0.890, Culture=neutral, PublicKeyToken=null
// MVID: A885D881-AEDF-447E-852A-6F13102E089C
// Assembly location: C:\Program Files\Tecnomatix_2402\eMPower\DotNetCommands\DnProcessSimulateCommands.dll

using EngineeringInternalExtension;
using System.Xml;


namespace DnProcessSimulateCommands;

internal class CApNodesFileWriter : CApXMLFileWriter
{
  private XmlElement m_nodesElement;

  internal CApNodesFileWriter(string filePath)
    : base(filePath)
  {
  }

  internal override void Initialize(
    TxExportGraphicsAnimationOutputData animationOutputData,
    CApC3DDocumentationSettings documentationSettings)
  {
    base.Initialize(animationOutputData, documentationSettings);
    this.m_nodesElement = this.m_document.CreateElement(CApDataFileDefinitions.NodesElement);
    this.m_document.AppendChild((XmlNode) this.m_nodesElement);
  }

  internal void AddAllNodes(TxExportGraphicsAnimationFileFormatEx fileFormat)
  {
    foreach (TxGraphicsAnimationExportedNode exportedNode in this.m_animationOutputData.ExportedNodes)
    {
      if (exportedNode.PdfId != "")
        this.SetChildValue(this.m_nodesElement, CApDataFileDefinitions.FormattedNodeId, exportedNode.PdfId, true);
    }
  }
}
